package com.hjs.mapper;

import com.hjs.bean.DividerOneSide;
import com.hjs.bean.AffiliatedFacility;
import com.hjs.bean.SidewalkOneSide;
import com.hjs.bean.Road;

import java.util.List;

/**
 * 道路相关的数据库操作
 *
 * @author violetfreesia
 * @date 2020/06/16
 */
public interface RoadMapper {
    boolean addOneRoad(Road obj);

    boolean addOneAffiliatedFacility(AffiliatedFacility obj);

    boolean addOneDividerOneSide(DividerOneSide obj);

    boolean addOneSidewalkOneSide(SidewalkOneSide obj);

    boolean deleteOneRoadById(int id);

    boolean deleteOneAffiliatedFacilityById(int id);

    boolean deleteOneDividerOneSideById(int id, int position);

    boolean deleteOneSidewalkOneSideById(int id, int position);

    boolean updateOneRoad(Road obj);

    boolean updateRoadAffiliatedFacilityID(Integer roadID, Integer affiliatedFacilityID);

    boolean updateRoadRoadwayID(Integer roadID, Integer roadwayID);

    boolean updateOneAffiliatedFacility(AffiliatedFacility obj);

    boolean updateOneDividerOneSide(DividerOneSide obj);

    boolean updateOneSidewalkOneSide(SidewalkOneSide obj);

    Road getOneRoadById(int roadId);

    Integer getMaintenanceLevelByRoadId(int roadId);

    Integer getRoadwayIdByRoadId(int roadId);

    List<SidewalkOneSide> getSidewalkById(int roadId);

    List<DividerOneSide> getDividerOneSideById(int roadId);

    AffiliatedFacility getOneAffiliatedFacilityById(int affiliatedFacilityId);

    List<Road> getAllRoad();

}
